﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Index</title>
    <script src="../../Scripts/jquery-1.8.0.min.js" type="text/javascript"></script>
    
        <script  type="text/javascript">
            function Button1_onclick() {
                $.post("/Page/Update", { pageID: 5, pageContent:"12211"}, function (data, status) {
                    if (status != "success") {
                        alert("发表评论失败，请重试！");
                        return;
                    }
                    if (data == "ok") {
                        alert("评论发表成功！");
                    }
                    else if (data == "none") {
                        alert("评论发表失败，请登陆！");
                    }
                    else {
                        alert(data);
                        alert(data.Message);
                        alert(data.Error);
                        alert("成功");
                    }
                    //                    for(int i = 0; i<data.resultList.length; i++)
                    //                    {

                    //                    }
                    //                        alert(data.notebook.ID+"+"+data.notebook.Name);
                    //                        
                    //                        alert("评论发表有问题！");
                    //                    }
                    //                    alert(data.PageList.length);
                    //document.getElementById("showDiv").innerHTML = data.Name;
                    //                    for(int i = 0; i<data.pageList.length; i++)
                    //                    {
                    //                        alert(data.pageList[i].Name);
                    //                        alert(data.pageList[i].Content);
                    //                    }
                })
            }
       </script>
</head>
<body>
     <div>
        <input id="Button1" type="button" value="button"  onclick="Button1_onclick()"/>
    </div>
    <div id="showDiv"></div>
</body>
</html>
